package com.qinggeng.project.system.service.impl;

import com.qinggeng.project.system.domain.ShareOrders;
import com.qinggeng.project.system.mapper.ShareOrdersMapper;
import com.qinggeng.project.system.service.ShareOrdersService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;

@Service
public class ShareOrdersServiceImpl implements ShareOrdersService {
    @Resource
    private ShareOrdersMapper shareOrdersMapper;

    @Override
    public void createShareOrders(Long ordersId, Long userId, Long courierId) {
        ShareOrders shareOrders = new ShareOrders();
        shareOrders.setOrdersId(ordersId);
        shareOrders.setUserId(userId);
        shareOrders.setCourierId(courierId);
        shareOrders.setCreateTime(new Date());
        shareOrdersMapper.insertSelective(shareOrders);
    }
}
